import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Classify from '../views/Classify.vue'
import Cart from '../views/Cart.vue'
import My from '../views/My.vue'
import Shang from '../views/Shang.vue'

const routes = [
  {
    path: '/',
    redirect:'/home'
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/classify',
    component: Classify
  },
  {
    path: '/cart',
    component: Cart
  },
  {
    path: '/my',
    component: My
  },
  {
    path: '/shang',
    component: Shang
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
